#!/bin/bash

DIR="$( dirname "${BASH_SOURCE[0]}" )"
DAEMONAPP="$( echo $DIR | awk -F / '{print $7}' )"
DAEMON_APP_ID="$(basename ${DAEMONAPP} .app)"


launchctl unload /Library/LaunchDaemons/$DAEMON_APP_ID.plist
rm /Library/LaunchDaemons/$DAEMON_APP_ID.plist
rm -R /Library/PrivilegedHelperTools/$DAEMON_APP_ID.app
defaults delete $DAEMON_APP_ID
